package cn.itcast.apollo.quickstart;

import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;

import java.time.LocalDateTime;

/**
 * @author ZhangJunqi
 * @Date 2024/9/21 -8:55
 * @Description: --
 */
public class ClusterTest {
    public static void main(String[] args) throws InterruptedException {
        Config config = ConfigService.getAppConfig ();
        String someKey = "sms.enable";

        while (true) {
            String value = config.getProperty (someKey, null);
            System.out.printf ("now: %s, timeout: %s%n", LocalDateTime.now ().toString (), value);
            Thread.sleep (3000L);
        }
    }
}
